home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html" />
- <!-- main template begins -->
- <xsl:template match="/">
- <HEAD>
- <LINK REL="StyleSheet" TYPE="text/css" HREF="elib.css"></LINK>
- <TITLE>eLibPro 圖書資訊</TITLE>
- </HEAD>
- <BODY leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
- <xsl:apply-templates />
- </BODY>
- </xsl:template>
- <!-- template for individual book begins -->
- <xsl:template match="Book">
- <table border="0" cellspacing="0" cellpadding="0" width="100%" class="maintable">
- <tr>
- <td>
- <!-- book title, first table in the main table -->
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr>
- <td class="maintitle">
- [color=red][b]<xsl:value-of select="Title" />[/b][/color]
- <xsl:if test="Subtitle!=''">
- <xsl:text> - </xsl:text>
- <xsl:value-of select="Subtitle" />
- </xsl:if>
- </td>
- </tr>
- </table>
- <!-- front cover, book details and back cover, second table in the main table -->
- <table border="0" cellspacing="1" cellpadding="0" width="100%">
- <tr valign="top">
- <td class="detailsbg">
- <table width="100%" border="0" cellspacing="1" cellpadding="0">
- <!-- author -->
- <xsl:if test="Author!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]作者: [/b]</td>
- <td class="cellvalue">
- <xsl:value-of select="Author" />
- </td>
- </tr>
- </xsl:if>
- <!-- publisher -->
- <xsl:if test="Publisher!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]出版社: [/b]</td>
- <td class="cellvalue">
- <xsl:value-of select="Publisher" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="ISBN!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]ISBN: [/b]</td>
- <td class="cellvalue">
- <xsl:value-of select="ISBN" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="Edition!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]τëêµ£¼: [/b]</td>
- <td class="cellvalue">
- <xsl:apply-templates select="Edition" />
- </td>
- </tr>
- </xsl:if>
- <!-- release date -->
- <xsl:if test="ReleaseDate!=''">
- <tr valign="top" width="10%" nowrap="1">
- <td class="celllabel" width="10%" nowrap="1">[b]發行日期: [/b]</td>
- <td class="cellvalue">
- <xsl:value-of select="ReleaseDate" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="ListPrice!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]定價: [/b]</td>
- <td class="cellvalue">
- $<xsl:value-of select="ListPrice" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="PageCount!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]Θáüµò╕: [/b]</td>
- <td class="cellvalue">
- <xsl:value-of select="PageCount" />
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="URL!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]URL: [/b]</td>
- <td class="cellvalue">
- <a title="{URL}" href="{URL}" class="link"><xsl:value-of select="URL" /></a>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="AmazonRating!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1">[b]Amazon用戶評鑑: [/b]</td>
- <td class="cellvalue">
- <xsl:value-of select="AmazonRating" /> <xsl:text> / 5</xsl:text>
- <xsl:if test="NumOfReviews!=''"> (<xsl:value-of select="NumOfReviews" />個評鑑)</xsl:if>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="ISBN!=''">
- <tr valign="top">
- <td class="celllabel" width="10%" nowrap="1"></td>
- <td class="cellvalue">
- [img]http://images.amazon.com/images/P/<xsl:value-of select="ISBN" />.01.LZZZZZZZ.jpg[/img]
- </td>
- </tr>
- </xsl:if>
- </table>
- </td>
- <!-- end of book details -->
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </xsl:template>
- </xsl:stylesheet>
-